<!DOCTYPE html>
<html>
<head>
    <title><%=title%></title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <meta name="keywords" content="笑话, 笑话集市, 好笑的笑话, joke, 哈哈">
    <link rel='stylesheet' href='/stylesheets/style.css' />
    <link rel='stylesheet' href='/bootstrap-3.2.0-dist/css/bootstrap.min.css' />
    <link rel='stylesheet' href='/bootstrap-3.2.0-dist/css/bootstrap-theme.min.css' />
    <!--[if lt IE 9]>
    <script type="text/javascript">
        var unsupport = true;
    </script>
    <![endif]-->
    <script type="text/javascript">
        if("unsupport" in window){
            document.location.replace("/browser_version_is_too_low");
        }
    </script>
</head>
<body class="inner">
<section>
    <header>
        <section id="logo">
            <span class="express"></span>
        </section>
        <nav class="clearfix">
            <a href="/" target="_self" class="active"> 首页</a>
            <a href="/chat" target="_self"> 聊天室</a>
            <a href="/game/cleanmine" target="_self">扫雷</a>
            <% if(! username ){%>
            <a href="/signin" target="_self">登录</a>
            <%} else { %>
            <a href="/" target="_self"><%=username%></a>
            <%}%>
        </nav>
    </header>
    <div id="maincontent" style="margin: 0 auto;width: 90%">
        <% for(var i in data){ %>
            <div class="panel panel-default">
                <div class="panel-heading">
                    <%=data[i].content%>
                </div>
                <div class="panel-body">
                    <% if(data[i].picture != ""){ %>
                    <img src="<%=data[i].picture%>">
                    <%}%>
                </div>
            </div>
        <%}%>
    </div>
    <div style="margin:0 auto;width: 90%;height: 50px;text-align: center;">
        <%if (pagenum > 1){%>
        <button class="btn btn-primary" onclick="document.location.href='/<%=+pagenum-1%>'">上一页</button>
        <%}%>
        <button class="btn btn-primary" onclick="document.location.href='/<%=+pagenum+1%>'">下一页</button>
    </div>
    <div style="width: 100%;height: 1px;background-color: #dcdcdc;">
    </div>
    <p style="text-align: center;color: darkgray">本站内容来自互联网，如有侵权请联系shadowee@qq.com删除</p>
</section>


<script type="text/javascript" src="/javascripts/jquery-1.11.0.min.js"></script>
<script type="text/javascript" src="/bootstrap-3.2.0-dist/js/bootstrap.min.js"></script>
<script>
    window.onscroll = function(){
       var top = document.body.scrollTop;
       if(top!=0){
           document.body.className = "inner scroll" ;
       }else{
           document.body.className = "inner";
       }
   };
</script>
</body>
</html>